package com.jiawa.train.batch.feigen;

import com.jiawa.train.common.resp.CommonResp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Date;


/**
 * @Params  @FeignClient 表示一个客户端
 * @Return
 * @Description
 * @Author zhangguangyan
 * @Date 2023/05/13
 */
//@FeignClient( name= "business", url = "http://localhost:8002/business")
@FeignClient(value = "business", fallback = BusinessFeignFallback.class)
public interface BusinessFeigen {
    @GetMapping("/business/hello")
    String hello();
    @GetMapping("/admin/daily-train/gen-daily/{date}")
    CommonResp<Object> genDaily(@PathVariable @DateTimeFormat(pattern = "yyyy-MM-dd") Date date);
}
